const utils = {
  /**
   * 延迟
   * @param ms 延迟时间, 默认100-300ms
   * @returns {Promise<unknown>}
   */
  delay(ms) {
    return new Promise(resolve => {
      setTimeout(resolve, ms ?? 100 + Math.random() * 200)
    })
  },
}

export default utils
